import 'package:flutter/material.dart';
import 'dart:ui';
import 'dart:math';

class UIConstBean {
  static const double  HomeChartH = 242.0;
  static const double  ToolEmptyH = 160.0;
  static const double  FormItemWH = 54.0;
  static const double  HomeNewItemH = 236.0;
  static const double  HomeWaitMatterItemH = 133.0;
  static const double  FormHeadItemWH = 24.0;
  static const double  HomeWeatherH = 52.0;
  static const double  HomeTabbarH = 60.0;
  static const double  ContractItemH = 45.0;
  static const double  ContractItemW = 36.0;
  static const double  ContractItemWWithLine = 86.0;
  static const double  ContractItemLineLargeW = 50.0;
  static const double  ContractItemLineLittleW = 28.0;
  static const double  ContractSectionH = 103;
  static const double  NewItemWH = 108;
  static const double  LRSpace = 16.0;
  static const double  InnerLRSpace = 12.0;
  static const double  InnerTopSpace = 14.0;
  static const double  CircularRadius = 10.0;
  static double  ScreenW = window.physicalSize.width;
  static double  ScreenH = window.physicalSize.height;
  static Color RandomColor({int r = 255, int g = 255, int b = 255, a = 255}) {
    if (r == 0 || g == 0 || b == 0) return Colors.black;
    if (a == 0) return Colors.white;
    return Color.fromARGB(
      a,
      r != 255 ? r : Random.secure().nextInt(r),
      g != 255 ? g : Random.secure().nextInt(g),
      b != 255 ? b : Random.secure().nextInt(b),
    );
  }

}
